package org.ushio.nchu_22201406.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ushio.nchu_22201406.pojo.PhoneBillRecord;
import org.ushio.nchu_22201406.service.PhoneBillRecordService;

import java.util.List;

@RestController
@RequestMapping("/api")
public class PhoneBillRecordController {
    private final PhoneBillRecordService phoneBillRecordService;
    @Autowired
    public PhoneBillRecordController(PhoneBillRecordService phoneBillRecordService) {
        this.phoneBillRecordService = phoneBillRecordService;
    }
    @GetMapping("/phoneBillRecord")
    public List<PhoneBillRecord> getAllPhoneBillRecord() {
        return phoneBillRecordService.getAllPhoneBillRecord();
    }
}
